
struct VS_IN_Pos
{
	float3 posL     : POSITION;
};

struct VS_IN_PosNorTanTex
{
	float3 posL     : POSITION;
	float3 normalL  : NORMAL0;
	float3 tangentL : TANGENT0;
	float2 texCoord : TEXCOORD0;
};

// specPower assumed to be in range [0, 1024]
float encodeSpecPowerToUNorm(float specPower)
{
	const float oneOver1024 = 1.0f / 1024.0f;
	return specPower * oneOver1024;
}

// specPower assumed to be in range [0, 1024]
float decodeSpecPowerFromUNorm(float specPowerSNorm)
{
	return specPowerSNorm * 1024.0f;
}


DepthStencilState DepthOn
{
	DepthEnable = true;
};

DepthStencilState DepthOff
{
	DepthEnable = false;
};

BlendState Additive
{
	BlendEnable[0] = TRUE;
	SrcBlend = ONE;
	DestBlend = ONE;
	BlendOp = ADD;
};

BlendState NoBlend
{
  BlendEnable[0] = FALSE;
};

RasterizerState CullFront
{
	CullMode = FRONT;
	FillMode = SOLID;
};

RasterizerState CullBack
{
	CullMode = BACK;
	FillMode = SOLID;
};

RasterizerState Wireframe
{
	CullMode = NONE;
	FillMode = WIREFRAME;
};